-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JBEHAVE-1580 Add ability to convert parameters to particular type #62
Conversation
d9e78e6
to
72a7686
Compare
@@ -50,6 +50,11 @@ public <T> T valueAs(String name, Type type) { | |||
return convert(valueFor(name), type); | |||
} | |||
|
|||
@Override | |||
public <T> T valueAs(Type type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public <T> T valueAs(Type type) { | |
public <T> T as(Type type) { |
@@ -354,34 +355,44 @@ private static Object applyConverters(Object value, Type basicType, Queue<Parame | |||
(v, c) -> c.convertValue(v, c.getTargetType()), (l, r) -> l); | |||
} | |||
|
|||
@SuppressWarnings({ "unchecked", "rawtypes" }) | |||
public Object convertFromType(Object value, Type target) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public Object convertFromType(Object value, Type target) { | |
public Object convert(Object value, Type target) { |
?
return convertersChain; | ||
} | ||
|
||
private void putConverters(Type type, LinkedList<ParameterConverter> container) { | ||
private void putConverters(Type type, LinkedList<ParameterConverter> container, | ||
Function<Type, Boolean> baseTypeChecker) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function<Type, Boolean> baseTypeChecker) { | |
Predicate<Type> sourceTypePredicate) { |
e408d95
to
bca274f
Compare
|
||
<script type="syntaxhighlighter" class="brush: java"> | ||
<![CDATA[ | ||
@Then("the person page is greater than 18: $activityTable") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Then("the person page is greater than 18: $activityTable") | |
@Then("the person age is greater than 18: $activityTable") |
Kudos, SonarCloud Quality Gate passed! |
No description provided.